﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Employee_salary
{
    class HourlyWorker : Employee
    {
        private int Rate { get; set; }
        private int Hours { get; set; }
        private string  Name { get; set; }


        public HourlyWorker(string name, int rate, int hours) : base(name)
        {

            Name = name;
            Rate = rate;
            Hours = hours;
        }

        override public void CalculateSalary()
        {
            Console.WriteLine("  Hourly  -  Name: {0}  salary:  {1} $; ", Name, Rate*Hours);
        }

    }
}
